Conversation
…mps, zero-import removals Clears 5 criticals (happy-dom RCE, protobufjs, form-data, shell-quote, tar, vitest UI-server) and multiple highs (hono CORS, fast-uri SSRF trio, immutable, sharp libvips).
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_f788fc1c-0fa9-44e9-802a-f1390b598170) |
There was a problem hiding this comment.
Code Review
This pull request removes the Solana wallet integration components and associated dependencies, updates several packages (including upgrading sharp and vitest), and adds security mitigations to the nodemailer provider by disabling file and URL access to prevent potential arbitrary file read vulnerabilities. There are no review comments, so I have no feedback to provide.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Bug fix — scope: dependencies (root package.json), email provider, dead frontend files. Remediation batch C4 from the security audit: remediate the 285 production vulnerabilities (5 critical, 101 high) via
pnpm.overrides+ targeted bumps + removal of zero-import dependencies. No app code changes except the nodemailer transport hardening and deletion of the dead Solana wallet providers.Why was this change needed?
pnpm audit --prodreported 285 vulnerabilities (5 critical, 101 high). The five criticals: happy-dom VM-escape RCE (via@pigment-css/react), protobufjs arbitrary-code-execution, form-data unsafe boundary, shell-quote injection, tar DoS. Two direct deps (sharp,nodemailer) carried HIGHs that the declared semver ranges could never reach. The removal targets (@solana/*,@postiz/wallets,sweetalert2,@mantine/modals,viem) were verified zero-import by the audit.Technical Details & Scope
pnpm.overrides(9):tar ^7.5.19,form-data ^2.5.4,protobufjs ^7.5.5,shell-quote ^1.8.4,fast-uri ^3.1.6,hono ^4.12.34,immutable ^5.1.8,handlebars ^4.7.9,happy-dom ^20.0.0(clears the VM-escape RCE without removing@pigment-css/react— which is transitively required by@neynar/reactand kept).sharp ^0.33.4 → ^0.35.0(clears 4 libvips CVEs on the user-upload path),vitest 3.1.4 → 3.2.6+@vitest/ui 1.6.0 → 3.2.6+@vitest/coverage-v8 → 3.2.6(clears GHSA-5xrq-8626-4rwp critical).sweetalert2+@sweetalert2/theme-dark,@mantine/modals,@solana/wallet-adapter-react+-react-ui,@postiz/wallets,viem,@tailwindcss/vite(v4 unused); dead fileswallet.provider.tsx+placeholder/wallet.ui.provider.tsxdeleted (the only importers of the Solana chain).disableFileAccess/disableUrlAccessadded to the transport (GHSA-p6gq-j5cr-w38f —rawbypass). The major bump 7→9 is deferred pending email transport testing.parse5(used bystrip.html.validation.ts,x.provider.ts),canvas+image-to-pdf(used bylinkedin.provider.ts),@meronex/icons+@pigment-css/react(transitively required bypolotno/@neynar/react— the audit's "zero direct imports" finding did not account for transitive bundler imports).Verification & Testing
pnpm-lock.yaml(resolved versions above patched thresholds — table in the audit doc).pnpm install→ +150/−1085 packages; peer warnings are pre-existing majors (eslint 8→9, prettier 2→3, tsup/swc chains) deferred as separate migrations.next build(frontend, Turbopack),nest build(backend + orchestrator) on Node 22.rawusage anywhere; flags enforced at transport level.QA
pnpm install— expect success with no ERR_PNPM_JSON_PARSE (all workspacepackage.jsonvalid).findstr /C:"tar@7." /C:"form-data@2.5" /C:"protobufjs@7." /C:"shell-quote@1." /C:"fast-uri@3." /C:"hono@4." /C:"immutable@5." /C:"handlebars@4." /C:"happy-dom@20." pnpm-lock.yaml— expect every resolved version at/above the patched thresholds.pnpm list sharp vitest --depth 0— expect sharp ≥0.35, vitest 3.2.6.pnpm --filter ./apps/frontend run buildandpnpm --filter ./apps/backend run buildandpnpm --filter ./apps/orchestrator run build— expect all three to exit 0.pnpm audit --prod(withNODE_OPTIONS=--max-old-space-size=8192) — expect the 5 previous criticals gone (happy-dom/tar/form-data/protobufjs/shell-quote) and vitest's gone; remaining highnodemailer@7is mitigated (documented, major bump deferred).apps/frontend/src/components/auth/providers/wallet.provider.tsxno longer exists and the login page renders without Solana (register page + Apple/Farcaster/Github/Google providers unchanged).Checklist:
pnpm run build).pnpm dlx tsx scripts/branding-guard.ts).Note
Medium Risk
Dependency overrides and image-processing (
sharp) bumps affect the whole install graph; nodemailer flag changes touch outbound email, and removing wallet auth is a visible login behavior change if WALLET was still enabled in production.Overview
This PR is a dependency security remediation batch: it adds nine
pnpm.overrides(e.g.tar,form-data,protobufjs,happy-dom) and bumpssharpand Vitest to clear critical/high audit findings, while dropping unused packages (@solana/*,@postiz/wallets,sweetalert2,viem,@mantine/modals,@tailwindcss/vite).Application-facing changes are limited: the Solana wallet login UI and provider (
wallet.provider.tsxand placeholder UI) are deleted with those deps—wallet sign-in is no longer offered from the frontend. Nodemailer transport now setsdisableFileAccessanddisableUrlAccessto mitigate GHSA-p6gq-j5cr-w38f without a major nodemailer upgrade.Reviewed by Cursor Bugbot for commit 7ea021d. Configure here.